package com.lmx.repoDomain.tmodel;

import io.katharsis.resource.annotations.JsonApiResource;
import io.katharsis.resource.annotations.JsonApiToOne;

import javax.persistence.*;

/**
 * 
 */
@Entity
@Table(name = "tnb_evaluateanswer_serviceitem")
@JsonApiResource(type = "evaluateansweritem")
public class EvaluateAnswerServiceItem extends BaseEntity {
 
	private EvaluateAnswer answer;// 答案
	private CustomerServiceItem item;// 服务项目
	private String remark;// 备注

	@JsonApiToOne
	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
	@JoinColumn(name = "evaluateanswer_id", foreignKey = @ForeignKey(name = "null"))
	public EvaluateAnswer getAnswer() {
		return answer;
	}

	public void setAnswer(EvaluateAnswer answer) {
		this.answer = answer;
	}

	@JsonApiToOne
	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
	@JoinColumn(name = "serviceitem_id", foreignKey = @ForeignKey(name = "null"))
	public CustomerServiceItem getItem() {
		return item;
	}

	public void setItem(CustomerServiceItem item) {
		this.item = item;
	}

}